home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / batkit50.zip / BATDEMO.BAT < prev    next >
DOS Batch File  |  1988-08-23  |  4KB  |  158 lines

  1. echo off
  2. SAVEDIR
  3. if errorlevel 3 goto OLDOS
  4. if errorlevel 1 goto ENVERR
  5. set
  6. SET TEST=To_determine_whether_there_is_enough_space.
  7. IF not "%TEST%"=="To_determine_whether_there_is_enough_space." goto ENVERR
  8. SET TEST=
  9. SET BDIR=%LDIR%
  10. rem If BatKit is in a ROOT, set BDIR to strip "\" from end.
  11. if %LDIR%==%LDRV%\ SET BDIR=%LDRV%
  12.  
  13. :MENU
  14. %BDIR%\SAVEDIR %BDIR%
  15. %BDIR%\GetKey /K"12345DPHLX-"/F"%BDIR%\MENU.GKF"/E
  16. if errorlevel 88 goto STOP
  17. if errorlevel 80 goto PRINT
  18. if errorlevel 76 goto LIST
  19. if errorlevel 72 goto HELP
  20. if errorlevel 68 goto SUBMEN
  21. if errorlevel 53 goto BIGMENU
  22. if errorlevel 52 goto MAKESCRN
  23. if errorlevel 51 goto COLOTONE
  24. if errorlevel 50 goto WP
  25. if errorlevel 49 goto DEMO
  26. if errorlevel 45 goto QUIT
  27. goto QUIT
  28.  
  29. :COLOTONE
  30. SET GK=This is here to save plenty of room for the GK variable
  31. %BDIR%\GetKey /M"#&22@C"/N/W0
  32. COMMAND /C COLOTONE
  33. goto MENU
  34.  
  35. :WP
  36. getkey /w10/m"@H@T    #&1E  This is just a #&9Esample#&1E menu selection; it is not functional."
  37. ::cd \document
  38. ::\WP50\wp
  39. goto MENU
  40.  
  41. :DEMO
  42. %BDIR%\GetKey /F"DEMO.GKF"
  43. Goto MENU
  44.  
  45. :BIGMENU
  46. GETKEY /S/K"123456789-X"/4/F"ASMENU.GKF"
  47. :TEST
  48. IF ERRORLEVEL 88 GOTO MENU
  49. IF ERRORLEVEL 57 GETKEY /W0/M"@S9"
  50. IF ERRORLEVEL 56 GETKEY /W0/M"@S8"
  51. IF ERRORLEVEL 55 GETKEY /W0/M"@S7"
  52. IF ERRORLEVEL 54 GETKEY /W0/M"@S6"
  53. IF ERRORLEVEL 53 GETKEY /W0/M"@S5"
  54. IF ERRORLEVEL 52 GETKEY /W0/M"@S4"
  55. IF ERRORLEVEL 51 GETKEY /W0/M"@S3"
  56. IF ERRORLEVEL 50 GETKEY /W0/M"@S2"
  57. IF ERRORLEVEL 49 GETKEY /W0/M"@S1"
  58. IF ERRORLEVEL 45 GETKEY /W0/M"@S255"
  59. GETKEY /K"123456789-X"/M"@X65@Y21"
  60. GOTO TEST
  61. goto MENU
  62.  
  63. :MAKESCRN
  64. GetKey /w0/f"msdemo.gkf"/s
  65. goto MENU
  66.  
  67. :PRINT
  68. COPY %BDIR%\BATKIT.DOC PRN
  69. goto MENU
  70.  
  71. :LIST
  72. GetKey /k"yn"/m"@T    Do you have a text file viewer called LIST? "
  73. if errorlevel 89 goto HAVELIST
  74. type %BDIR%\BATKIT.DOC | more
  75. goto MENU
  76. :HAVELIST
  77. LIST %BDIR%\BATKIT.DOC 
  78. goto MENU
  79.  
  80. :HELP
  81. GetKey /h
  82. GetKey /w30/m"@X65#&1FPress any key"
  83. goto MENU
  84.  
  85. :SUBMEN
  86. %BDIR%\SAVEDIR
  87. %BDIR%\GetKey /K"XLGFDC-"/F"%BDIR%\MENU.GKF@S"/E/A
  88. if errorlevel 88 goto MENU
  89. if errorlevel 76 goto LSTFILE
  90. if errorlevel 71 goto CHGDIR
  91. if errorlevel 70 goto FORMAT
  92. if errorlevel 68 goto DELETE
  93. if errorlevel 67 goto COPY
  94. goto MENU
  95.  
  96. :CHGDIR
  97. %BDIR%\GetKey /L21/G/V"NPATH"/M"@X50@Y6#&0E@DT@X16@Y20Enter the NEW drive and path: @T&05#&700"
  98. if %NPATH%! == ! goto SUBMEN
  99. %BDIR%\SAVEDIR %NPATH%
  100. set NPATH=
  101. goto SUBMEN
  102.  
  103. :LSTFILE
  104. %BDIR%\GetKey /w0/m"@O@C"
  105. dir/p
  106. %BDIR%\WAIT /c 00:00:30
  107. goto SUBMEN
  108.  
  109. :DELETE
  110. %BDIR%\GetKey /L8/G/N"*"/KF"GetKey.RSP"/M"@X20@Y20Enter password: (Hint - try Password) "
  111. %BDIR%\GetKey /Z/L12/g/v"DFILE"/f"%BDIR%\MENU.GKF@D"
  112. if %DFILE%! == X! goto SUBMEN
  113. echo -
  114. echo -
  115. dir %DFILE%
  116. %BDIR%\GetKey /m"══  Press Y to delete %LDIR%\%DFILE%: "/n
  117. if errorlevel 90 goto SUBMEN
  118. if errorlevel 89 DEL %DFILE%
  119. %BDIR%\WAIT /c 00:00:30
  120. goto SUBMEN
  121.  
  122. :COPY
  123. getkey /w10/m"@H@T        #&1E  This is just a #&9Esample#&1E menu selection; it is not functional. @CR-"
  124. goto SUBMEN
  125.  
  126. :FORMAT
  127. %BDIR%\GetKey /v/k"abx"/m"@X50@Y6#&0E@DT@X20@Y20Diskette drive to format (or X to eXit): "
  128. if errorlevel 88 goto SUBMEN
  129. cls
  130. format %GK%:
  131. goto SUBMEN
  132.  
  133. :STOP
  134. %BDIR%\GetKey /f"%BDIR%\menu.gkf@x"/N
  135. if errorlevel 78 goto PARK
  136. if errorlevel 77 goto MENU
  137.  
  138. :PARK
  139. %BDIR%\SAVEDIR %BDIR%
  140. SET BDIR=
  141. SET LDIR=
  142. SET LDRV=
  143. SET GK=
  144. echo You can insert any PARK or shutdown prodcedures here.
  145. echo THANKS for trying BATKIT!
  146. goto QUIT
  147.  
  148. :OLDOS
  149. getkey /w0/z/m"@T       #&CABatKit requires MS or PC-DOS 2.x or 3.x to run!"
  150. wait /c 000030
  151. goto QUIT
  152.  
  153. :ENVERR
  154. getkey /w0/z/m"@T   #&CAYou don't have enough free environment space for BatDemo!  See README.1ST."
  155. wait /c 000030
  156.  
  157. :QUIT
  158.